<html xmlns:th="http://www.thymeleaf.org" xmlns:x="http://www.w3.org/1999/html">
<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'center',border:false" title="" style="overflow: hidden;padding: 3px;">
        <form id="contactsPeopleEditForm" method="post">
            <table class="grid">
                <input name="id" type="hidden" th:value="${contactsPeople.id}">
                <tr>
                    <td></td>
                    <td><input name="id" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.id}"></td>
                    <td></td>
                    <td><input name="realName" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.realName}"></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input name="mobile" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.mobile}"></td>
                    <td></td>
                    <td><input name="company" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.company}"></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input name="desc22" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.desc22}"></td>
                    <td></td>
                    <td><input name="deptName" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.deptName}"></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input name="birthPlace" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.birthPlace}"></td>
                    <td></td>
                    <td><input name="realAddress" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.realAddress}"></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input name="enterpriseName" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.enterpriseName}"></td>
                    <td></td>
                    <td><input name="reservedOne" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.reservedOne}"></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input name="reserved2" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.reserved2}"></td>
                    <td></td>
                    <td><input name="reserved3" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.reserved3}"></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input name="reserved4" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.reserved4}"></td>
                    <td></td>
                    <td><input name="reserved5" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.reserved5}"></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input name="updateTime" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.updateTime}"></td>
                    <td></td>
                    <td><input name="createTime" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.createTime}"></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input name="createDay" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.createDay}"></td>
                <tr>
                    <td></td>
                    <td><input name="updateDay" type="text" placeholder="请输入" class="easyui-validatebox"
                               data-options="required:true" th:value="${contactsPeople.updateDay}"></td>
                </tr>
            </table>
            </table>
        </form>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        $('#contactsPeopleEditForm').form({
            url: basePath + '/contactsPeople/edit',
            onSubmit: function () {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success: function (result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.code === 1) {
                    //之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为list页面预定义好了
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    var form = $('#contactsPeopleEditForm');
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });

        $("#contactsPeopleEditStatus").val('[[${contactsPeople.status}]]');
    });
</script>
